package com.edu.vo;


	/**
	* @Title: ResultVO.java
	* @Description: TODO
	* @Author zhu
	* @Date 2017/11/169:30
	* @Annotation 统一的结果返回VO
	*/
public class ResultVO {
	
	private int code;
	private String message;
	

	public ResultVO(int code) {
		super();
		this.code = code;
	}
	/**
	 * 
	 * @param code
	 * @param message
	 */
	public ResultVO(int code, String message) {
		super();
		this.code = code;
		this.message = message;
	}
	/**
	 * 成功的返回
	 * @return
	 */
	public static ResultVO getSuccessResultVO(){
		return new ResultVO(ServerConstant.SUCCESS, "操作成功");	
	}
	
	public static ResultVO getSuccessWithMessage(String message){
		return new ResultVO(ServerConstant.SUCCESS, message);	
	}
	
	public static ResultVO getErrorResultVO(String message){
		return new ResultVO(ServerConstant.SERVER_INTERNAL_ERROR, message);	
	}
	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	
	
}
